Electronic key systems have hitherto been known, wherein wireless communication takes place between an electronic key carried by a user and an on-board device used in a vehicle to unlock a vehicle door. In such an electronic key system, the on-board device transmits a request signal to the electronic key, and the electronic key that has received the request signal transmits a response signal to the on-board device to communicate with each other, whereby the electronic key is verified. Normally, the communication is established only when the electronic key is present within a range where the electronic key can receive the request signal transmitted by the on-board device, whereupon the electronic key is verified and the vehicle door can be unlocked.
However, by establishing communication between the on-board device and the electronic key via a repeater that can relay the request signal and the response signal, a third person can unlock the vehicle door contrary to the user's intention. Such a technique of unlocking the vehicle door using a repeater is generally referred to as a relay attack.
Patent Literature 1, for example, discloses a method of preventing relay attacks, wherein a relay attack is detected using the fact that repeaters transmit relayed signals with a constant signal strength. With this method, when the on-board device transmits a request signal, the on-board device changes the signal strength with a fixed pattern. When the electronic key receives the request signal and determines that the strength of the request signal changes with this fixed pattern, the key transmits a response signal. In a relay attack by using a repeater, the repeater transmits the request signal with a constant signal strength. Accordingly, the request signal received by the electronic key has a constant signal strength, and a pattern of the signal strength does not change. Therefore, the electronic key does not transmit the response signal, and verification fails.